<ion-view view-title="新品赠送" class="myworld_newpro">

    <ion-content>

        <div class="list">
            <li class="item positive-bg padding-0">
                <div class="light-bg margin-left-10-my padding-10">
                    发起营销活动
                </div>
            </li>
            <li class="item item-input">
                <span class="input-label">活动名称</span>
                <input type="text" placeholder="请输入活动名称" ng-model="scopeModel.name" />
            </li>
            <li class="item item-input" ion-datetime-picker title="'请输入开始时间'" ng-model="scopeModel.start_time">
                <span class="input-label">开始时间</span>
                <input type="text" placeholder="请输入开始时间" class="timeLight" ng-class="{'timeNoneInfo':scopeModel.start_time}">{{scopeModel.start_time|
                date: "yyyy-MM-dd H:mm:ss"}}</input>
            </li>
            <li class="item item-input" ion-datetime-picker title="'请输入申请结束时间'" ng-model="scopeModel.apply_end_time">
                <span class="input-label">申请结束时间</span>
                <input type="text" placeholder="请输入申请结束时间" class="timeLight" ng-class="{'timeNoneInfo':scopeModel.apply_end_time}">{{scopeModel.apply_end_time|
                date: "yyyy-MM-dd H:mm:ss"}}</input>

            </li>
            <li class="item item-input" ion-datetime-picker title="'请输入活动结束时间'" ng-model="scopeModel.end_time">
                <span class="input-label">活动结束时间</span>
                <input type="text" placeholder="请输入活动结束时间" class="timeLight" ng-class="{'timeNoneInfo':scopeModel.end_time}">{{scopeModel.end_time|
                date: "yyyy-MM-dd H:mm:ss"}}</input>
            </li>
            <div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 15px;">
                    <div class="input-label">品牌：</div>
                    <div class="input-value" ng-click="doSelectBrand()">{{input.brand.name}}</div>
                </div>
            <li class="item item-input">
                品类：
                <div class="input-value small" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
                <div class="input-value small" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
                <div class="input-value small" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
            </li>
            <li class="item positive-bg padding-0">
                <div class="light-bg margin-left-10-my padding-10">
                    选择商品
                    <i class="icon ion-ios-plus-outline right-zhang positive font-1rem-my" on-tap="openGoods()"></i>
                </div>
            </li>

            <li class="item padding-0">
                <div class="row text-center font-large-my">
                    <div class="col">商品名称</div>
                    <div class="col">市场价</div>
                    <div class="col">赠送价</div>
                    <div class="col">抽取数量</div>
                    <div class="col">操作</div>
                </div>
            </li>
            <li class="item padding-0 stable-bg" ng-show="is_goods">
                <div class="row padding-0 ">
                    <div class="col"><input type="text" readonly="" style="width: 100%;" class="text-center font-large-my" ng-model="scopeModel.goods_name"
                        /></div>
                    <div class="col"><input type="text" style="width: 100%;" readonly="" ng-model="scopeModel.mktprice" class="text-center font-large-my"></input>
                    </div>
                    <div class="col"><input type="text" style="width: 100%;" placeholder="赠送价" class="text-center font-large-my" ng-model="scopeModel.price"
                        /></div>
                    <div class="col"><input type="text" style="width: 100%;" placeholder="抽取数量" class="text-center font-large-my" ng-model="scopeModel.count"></input>
                    </div>
                    <div class="col font-large-my text-center positive" style="line-height: 34px;"><i class="icon ion-ios-close-outline assertive font-1rem-my" ng-click="del()"></i></div>
                </div>
            </li>
            <li class="item positive-bg padding-0">
                <div class="light-bg margin-left-10-my padding-10">
                    问卷答题设置
                </div>
            </li>
            <div ng-repeat="question in scopeModel.paper.questions">
                <!--循环的div-->
                <li class="item item-input">
                    题目：
                    <textarea rows="3" placeholder="请输入题目">{{question.question}}</textarea>
                </li>
                <ion-list can-swipe="true">
                    <ion-item ng-repeat="answer in question.answer">
                        {{answer.choose_no}}、{{answer.data}}
                        <ion-option-button class="icon ion-compose button-balanced">编辑</ion-option-button>
                        <ion-option-button class="icon ion-close button-assertive" ng-click="delanswer(question.id,answer.id)">删除</ion-option-button>
                    </ion-item>
                </ion-list>
                <li class="item padding-5">
                    <span class="positive font-large-my">
			 	<i class="icon ion-plus"></i>
					增加答案
				</span>
                    <span class="right-zhang">正确答案：<span class="assertive">{{question.right_no}}</span></span>
                </li>
            </div>
            <!--循环的div-->
        </div>

        <div class="button-bar padding">
            <button class="button  button-assertive" on-tap="tui()">取消</button>
            <button class="button  button-positive col-offset-10" on-tap="submit()">保存</button>
        </div>

    </ion-content>
</ion-view>